/* 
 * COPYRIGHT Avetti.com Corporation 1998-2007.  All Rights Reserved 
*/
package com.avetti.commerce.domainmodel;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** @author Hibernate CodeGenerator */
public class Isocountry implements Serializable {
    
	private static final long serialVersionUID = 1L;
	
	public static final int USA_COUNTRY_ID = 1;

	/** identifier field */
    private Integer id;

    /** nullable persistent field */
    private String name;

    /** nullable persistent field */
    private String a2;

    /** nullable persistent field */
    private String a3;

    /** nullable persistent field */
    private String a4;

    /** nullable persistent field */
    private String lang;

    /** full constructor */
    public Isocountry(Integer id, String name, String a2, String a3, String a4, String lang) {
        this.id = id;
        this.name = name;
        this.a2 = a2;
        this.a3 = a3;
        this.a4 = a4;
        this.lang = lang;
    }

    /** default constructor */
    public Isocountry() {
    }

    public Isocountry(Isocountry isocountry) {
        this.id = isocountry.id;
        this.name = isocountry.name;
        this.a2 = isocountry.a2;
        this.a3 = isocountry.a3;
        this.a4 = isocountry.a4;
        this.lang = isocountry.lang;
    }
    
    /** minimal constructor */
    public Isocountry(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getA2() {
        return this.a2;
    }

    public void setA2(String a2) {
        this.a2 = a2;
    }

    public String getA3() {
        return this.a3;
    }

    public void setA3(String a3) {
        this.a3 = a3;
    }

    public String getA4() {
        return this.a4;
    }

    public void setA4(String a4) {
        this.a4 = a4;
    }

    public String getLang() {
        return this.lang;
    }

    public void setLang(String lang) {
        this.lang = lang;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("id", getId())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof Isocountry) ) return false;
        Isocountry castOther = (Isocountry) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getId())
            .toHashCode();
    }

}
